package com.svndiffdoc;

import java.util.ArrayList;
import java.util.List;

import org.tmatesoft.svn.core.wc.ISVNDiffStatusHandler;
import org.tmatesoft.svn.core.wc.SVNDiffStatus;
import org.tmatesoft.svn.core.wc.SVNStatusType;

public class DiffStatusHandler implements ISVNDiffStatusHandler {
    private final List<SVNDiffStatus> diffList;

    public DiffStatusHandler() {
        diffList = new ArrayList<SVNDiffStatus>();
    }

    @Override
    public void handleDiffStatus(SVNDiffStatus diffStatus) {
        if (diffStatus.getModificationType() == SVNStatusType.STATUS_NONE) {
            return;
        }
        diffList.add(diffStatus);
    }

    public List<SVNDiffStatus> getSVNDiffStatusList() {
        return diffList;
    }
}
